package com.hyl.springbootredis.service;

import com.hyl.springbootredis.entity.BasDict;
import com.hyl.springbootredis.mapper.BasDictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * BasDictServiceImpl
 *
 * @author hyl
 * @date 2025-01-13
 */
@Service("basDictService")
public class BasDictServiceImpl implements BasDictService{
    @Autowired
    private BasDictMapper basDictMapper;

    @Override
    @Cacheable(value = "selectAll",keyGenerator="keyGenerator")
    public List<BasDict> selectAll() {
        return basDictMapper.selectList(null);
    }

    @Override
    public int insert(BasDict basDict) {
        return basDictMapper.insert(basDict);
    }
}
